package com.yida.gwj.config.service.impl;

import com.yida.common.core.utils.DateUtils;
import com.yida.gwj.api.domain.GwjConfDictType;
import com.yida.gwj.config.mapper.GwjConfDictTypeMapper;
import com.yida.gwj.config.service.IGwjConfDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 业务字典类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-28
 */
@Service
public class GwjConfDictTypeServiceImpl implements IGwjConfDictTypeService
{
    @Autowired
    private GwjConfDictTypeMapper gwjConfDictTypeMapper;

    /**
     * 查询业务字典类型
     * 
     * @param dictId 业务字典类型主键
     * @return 业务字典类型
     */
    @Override
    public GwjConfDictType selectGwjConfDictTypeByDictId(Long dictId)
    {
        return gwjConfDictTypeMapper.selectGwjConfDictTypeByDictId(dictId);
    }

    /**
     * 查询业务字典类型列表
     * 
     * @param gwjConfDictType 业务字典类型
     * @return 业务字典类型
     */
    @Override
    public List<GwjConfDictType> selectGwjConfDictTypeList(GwjConfDictType gwjConfDictType)
    {
        return gwjConfDictTypeMapper.selectGwjConfDictTypeList(gwjConfDictType);
    }

    /**
     * 新增业务字典类型
     * 
     * @param gwjConfDictType 业务字典类型
     * @return 结果
     */
    @Override
    public int insertGwjConfDictType(GwjConfDictType gwjConfDictType)
    {
        gwjConfDictType.setCreateTime(DateUtils.getNowDate());
        return gwjConfDictTypeMapper.insertGwjConfDictType(gwjConfDictType);
    }

    /**
     * 修改业务字典类型
     * 
     * @param gwjConfDictType 业务字典类型
     * @return 结果
     */
    @Override
    public int updateGwjConfDictType(GwjConfDictType gwjConfDictType)
    {
        gwjConfDictType.setUpdateTime(DateUtils.getNowDate());
        return gwjConfDictTypeMapper.updateGwjConfDictType(gwjConfDictType);
    }

    /**
     * 批量删除业务字典类型
     * 
     * @param dictIds 需要删除的业务字典类型主键
     * @return 结果
     */
    @Override
    public int deleteGwjConfDictTypeByDictIds(Long[] dictIds)
    {
        return gwjConfDictTypeMapper.deleteGwjConfDictTypeByDictIds(dictIds);
    }

    /**
     * 删除业务字典类型信息
     * 
     * @param dictId 业务字典类型主键
     * @return 结果
     */
    @Override
    public int deleteGwjConfDictTypeByDictId(Long dictId)
    {
        return gwjConfDictTypeMapper.deleteGwjConfDictTypeByDictId(dictId);
    }
}
